package org.budo.weixin.api;

import java.io.InputStream;
import java.util.Map;

import org.budo.weixin.api.response.SendMessageResponse;
import org.budo.weixin.api.response.SnsTokenResponse;
import org.budo.weixin.api.response.SnsUserInfoResponse;
import org.budo.weixin.api.response.UserInfoResponse;
import org.budo.weixin.message.Message;

/**
 * @author li
 * @version 1 (2015年5月28日 上午10:58:15)
 * @since Java7
 */
public interface WeixinApi {
    SnsTokenResponse getSnsToken(String appKey, String appSecret, String code);

    WeixinTokenEntity token(String appKey, String appSecret);

    SendMessageResponse sendMessage(Message message);

    String get_industry();

    String api_set_industry();

    String userGet(String next_openid);

    String wxCode2Session(String appKey, String appSecret, String code);

    String getWeixinToken(String appId, String appSecret);

    Map<String, Object> getWeixinTicket(String type);

    String getTicket(String type);

    InputStream downloadMedia(String mediaId);

    UserInfoResponse getUserInfo(String openId);

    /**
     * 获取不限个数的小程序码
     */
    byte[] getWxaCodeUnlimit(String scene, String page, Integer width, Boolean autoColor, Map<String, Object> lineColor);

    /**
     * 获取小程序码，适用于需要的码数量极多的业务场景。通过该接口生成的小程序码，永久有效，数量暂无限制
     */
    byte[] getWxaCodeUnlimit(String scene);

    SnsUserInfoResponse getSnsUserInfo(String accessToken, String openId);
}